<?php
require_once($_SERVER['DOCUMENT_ROOT']."/defaultconf.mex");
require_once($GLOBALS['PAD']."Modules/RHUSJW24/modconf.mex");

$id_request =  $_GET['RSID'];


MYTCONN();
$MYT = $GLOBALS['MYT'];
$MD = 'ED';

$Dados_Request = $GLOBALS['MYT']->db_array("SELECT * FROM systemoffice.it_requests
						WHERE ref = {$id_request}");

form_pr('update_ticket','','','post');
?>

<div id="bgnd" style="margin:4px">

<p>&nbsp;</p>

<table  width="637" border="0" cellpadding="1" align=center cellspacing="4" bgcolor="#F2F2F2" >
<tr>
    <td><b>Pedido N&uacute;mero</b></td>
	<label name="id1" id="id1">
	    <input name="id" type="text" id="id" disabled="disabled" bgcolor="#F2F2F2" value="<?php echo $id_request ?>" />
	</label>
	<td>&nbsp;</td>
    <td>&nbsp;</td>
</tr>
  <tr>
    <td width="200"><b>Nome:</b></td>
    <td width="183"><label name="nome" id="nome">
        <input name="nome" type="text" id="nome" disabled="disabled" bgcolor="#F2F2F2" value="<?php echo $Dados_Request[1]['main_users_ref']; ?>" />
      </label></td>
    <td width="132"><b>BalcÃo:</td>
    <td width="94">      <label>
        <input name="balcao" type="text" id="balcao" disabled="disabled" value="<?php echo $Dados_Request[1]['main_office_ref']; ?>" />
      </label></td>
  </tr>
  <tr>
    <td><b>Data Pedido:</td>
    <td>      <label>
        <input name="datapedido" type="text" id="datapedido" disabled="disabled" value="<?php echo $Dados_Request[1]['data']; ?>" />
      </label></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>

  <tr>
    <td><b>Estado:</td>
    <td>      <label>
        <input name="datapedido" type="text" id="datapedido" disabled="disabled" value="<?php echo $Dados_Request[1]['estado']; ?>" />
      </label></td>
    <td><b>Atribuir Estado</td>
	<td>	<select name="atribuirestado" id="atribuirestado">
          <option selected="selected"></option>
          <option value="Aberto">Aberto</option>
          <option value="Fechado">Fechado</option>
          <option value="Descontinuado">Descontinuado</option>
        </select></td>
  </tr>
    <tr>
    <td><b>Problema:</td>
    <td>&nbsp;</td>
	 <td>&nbsp;</td>
	  <td>&nbsp;</td>
  </tr>
  <tr>
    <td height="80" colspan="4"><?php echo $Dados_Request[1]['problema']; ?></td>
  </tr>
  <tr>
    <td><b>Data Prevista de Resolução:</td>
    <td><?php mn_field('date','ED','DataResolucao',$Dados_Request[1]['Data_Reso'],'update_ticket','16','','');?></td>
	    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><b>Prioridade:</td>
    <td>      <label>
        <input name="prioridade" type="text" id="prioridade" disabled="disabled" value="<?php echo $Dados_Request[1]['Prioridade']; ?>" />
      </label></td>
	    <td><b>Definir Prioridade</td>
    <td>
	<select name="defprioridade" id="defprioridade">
          <option selected="selected"></option>
          <option value="0">0</option>
          <option value="1">Imediato</option>
          <option value="2">24 Horas</option>
          <option value="3">48 Horas</option>
		  <option value="4">72 Horas</option>
		  <option value="5">+ 7 Dias</option>
        </select>
	</td>
  </tr>
  <tr>
    <td><b>Atribuido a:</td>
    <td>      <label>
        <input name="atribuido" type="text" id="atribuido" disabled="disabled" value="<?php echo $Dados_Request[1]['atribuido_a']; ?>" />
      </label></td>
    <td><b>Atribuir a:</td>
    <td>
      <label></label>
	  <?php mn_field('select','ED','Atribuir','',"SELECT smb_ID AS ID, smb_Name AS NAME FROM systemoffice.staff_members WHERE smb_Function = 7",' ','','');?>
    </td>
  </tr>

      <td><b>Observação:</td>
    <td colspan="2" rowspan="2">      <label>
      <textarea name="obs" cols="60" rows="3" id="obs"><?php echo $Dados_Request[1]['obs']; ?></textarea>
    </label></td>
  <tr>
    <td>&nbsp;</td>
  
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>               <div class="button">
          <p>
           <input type="button" style="margin:10px;height:20px;width:100px" value="Actualizar" onclick="
           	document.update_ticket.action='modules/It_Reports/update.php?id=<?php echo $id_request ?>';
			subform('update_ticket','bgnd');"/>
          </p>
           </div>
  </tr>

</table>
</div>

</body>
</html>
